<!DOCTYPE html>
<html>
<head>
    <title>订单基础信息表</title>
    <#include "/header.html">
</head>
<style>
    #rrapp{
        word-break:break-all;
        overflow-x: hidden;
    }
    #orderDetailDiv .form-group span{
        vertical-align: sub;
        color: gray;
    }
    .panel table tr{
        height: 30px;
    }
    .panel table tr td{
        vertical-align: middle !important;
    }
    #rrapp .el-cascader{
        width: 100%;
    }
    .panel table tr{
        height: 30px;
    }
    a:link,a:visited{
        text-decoration:none;
    }
    .el-dialog__body{
        margin-left:-25px;
    }

</style>
<body>
<div id="rrapp" v-cloak>
    <!-- 列表 -->
    <div v-show="showList">
        <!-- 查询 start -->
        <div class="grid-btn">
            <form class="form-inline" role="form">
                <a class="btn btn-default btn-sm" @click="reset"><i class="fa fa-refresh"></i></a>

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model.trim="q.orderId" @keyup.enter="query" placeholder="订单号">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model.trim="q.memberName" @keyup.enter="query" placeholder="会员名">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.status" @keyup.enter="query">
                        <option value="">订单状态</option>
                        <option v-for="item in e.orderInfoStatusEnum" :value="item.value">{{item.describe}}</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.auditStatus" @keyup.enter="query">
                        <option value="">审核状态</option>
                        <option value="0">待审核</option>
                        <option value="1">已审核</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.payStatus" @keyup.enter="query">
                        <option value="">支付状态</option>
                        <option value="0">未支付</option>
                        <option value="1">已支付</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <div class="form-group">
                        <input class="form-control input-sm" v-model="q.beginCreatetime" style="width: 120px;" @keyup.enter="query" @click = "checkBeginDate" placeholder="开始时间"/>
                        至
                        <input class="form-control input-sm" v-model="q.endCreatetime" style="width: 120px;"@keyup.enter="query" @click = "checkEndDate" placeholder="结束时间"/>
                    </div>&nbsp;&nbsp;&nbsp;
                </div>

                <a class="btn btn-default btn-sm"  @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
            </form>
        </div>
        <!-- 查询 end -->
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <!-- 物流发货 -->
    <div v-show="showLogi">
        <form class="form-group">
            <!-- 订单信息 start -->
            <div class="panel panel-default">
                <div class="panel-heading">
                    订单信息
                </div>
                <div class="panel-body">
                    <div class="row" style="line-height: 25px">
                        <div class="col-md-3 text-center">订单号：{{erpOrder == null ? '' : erpOrder.orderNo}}</div>
                        <div class="col-md-3 text-center">会员名：{{erpOrder == null ? '' : erpOrder.memberName}}</div>
                        <div class="col-md-3 text-center">订单金额：{{erpOrder == null ? '' : erpOrder.totalAmount}}</div>
                        <div class="col-md-3 text-center">送货方式：{{erpOrder == null ? '' : (erpOrder.sendType == true ? "自提" : "非自提") }}</div>
                    </div>

                </div>
            </div>
            <!-- 订单信息 end -->
            <!-- 发货信息 start -->
            <div class="panel panel-default">
                <div class="panel-heading">
                    发货信息
                </div>
                <div class="panel-body" style="line-height: 35px">
                    <div class="col-md-3" style="line-height: 45px">
                        <div class="row">
                            <div class="col-md-3 text-right"><span style="color: red">*&nbsp;</span>发货类型：</div>
                            <div class="col-md-9">
                                <el-radio-group v-model="erpLogisticsEntity.sendType" @change="sendTypeChange"
                                                size="mini">
                                    <el-radio :label="1" border>发票</el-radio>
                                    <el-radio :label="2" border>样品</el-radio>
                                    <el-radio :label="3" border>订单</el-radio>
                                </el-radio-group>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-3 text-right"><span style="color: red">*&nbsp;</span>物流类型：</div>
                            <div class="col-md-9">
                                <el-radio-group v-model="erpLogisticsEntity.logiType" size="mini">
                                    <el-radio :label="1" border>呼叫快递</el-radio>
                                    <el-radio :label="2" border>添加物流</el-radio>
                                    <el-radio :label="3" border>自提</el-radio>
                                </el-radio-group>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-3 text-right"><span style="color: red" v-if="erpLogisticsEntity.logiType === 3?false:true">*&nbsp;</span>物流方式：</div>
                            <div class="col-md-9">
                                <el-select v-model="erpLogisticsEntity.logisticsId" @change="logiTypeChange" filterable
                                           placeholder="请选择" size="mini">
                                    <el-option v-for="item in logisticsTypeList" :key="item.logisticsId"
                                               :label="item.logisticsName" :value="item.logisticsId"/>
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-3" style="line-height: 45px">
                        <div class="row" v-show="showLogiNo">
                            <div class="col-md-3 text-right">配送单号：</div>
                            <div class="col-md-9">
                                <input type="text" class="form-control input-sm" v-model="erpLogisticsEntity.logiNo"
                                       placeholder="配送单号"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-3 text-right">配送费用：</div>
                            <div class="col-md-9">
                                <input type="number" class="form-control input-sm" v-model="erpLogisticsEntity.logiCost"
                                       placeholder="配送费用"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-3 text-right">配送备注：</div>
                            <div class="col-md-9 text-right">
                                <input type="text" class="form-control input-sm" v-model="erpLogisticsEntity.logiRemark"
                                       placeholder="配送备注"/>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="row">
                            <div class="col-md-4 text-right"><span style="color: red">*&nbsp;</span>收货人：</div>
                            <div class="col-md-8 ">
                                <input type="text" class="form-control input-sm" v-model="erpLogisticsEntity.toPeople"
                                       placeholder="收货人"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right"><span style="color: red">*&nbsp;</span>收货联系方式：</div>
                            <div class="col-md-8 ">
                                <input type="text" class="form-control input-sm" v-model="erpLogisticsEntity.toPhone"
                                       value="{{erpOrder.shipName}}" placeholder="收货联系方式"/>
                            </div>
                        </div>
                        <!--<div class="row">
                            <div class="col-md-4 text-right"><span style="color: red">*&nbsp;</span>收货地区：</div>
                            <div class="col-md-8 ">
                                <el-cascader placeholder="试试搜索：武汉市" size="small" filterable
                                             style="width: 100%"
                                             :options="area"
                                             @change="handleItemChange">

                                </el-cascader>
                            </div>
                        </div>-->
                        <div class="row">
                            <div class="col-md-4 text-right">收货地区：</div>
                            <div class="col-md-8 ">
                                <input type="text" class="form-control input-sm" v-model="erpLogisticsEntity.toArea"
                                       placeholder="收货地区"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">收货地址：</div>
                            <div class="col-md-8 ">
                                <input type="text" class="form-control input-sm" v-model="erpLogisticsEntity.toAddress"
                                       placeholder="收货地址"/>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="row">
                            <div class="col-md-5 text-right">发货人：</div>
                            ziyun
                        </div>
                        <div class="row">
                            <div class="col-md-5 text-right">联系方式：</div>
                            400-000-2519
                        </div>
                        <div class="row">
                            <div class="col-md-5 text-right">发货地址：</div>
                            江汉区常青三路17B9-13
                        </div>
                    </div>
                </div>
            </div>
            <!-- 发货信息 end -->
            <!-- 发货明细 start -->
            <div class="panel panel-default" v-show="showSendDetail">
                <div class="panel-heading">
                    发货明细
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <el-table border stripe ref="multipleTable" :data="orderItemList"
                                  @selection-change="orderItemSelectionChange"
                                  tooltip-effect="dark" size="mini">
                            <el-table-column type="selection" width="55"></el-table-column>
                            <el-table-column prop="itemId" label="商品ID" width="100"></el-table-column>
                            <el-table-column prop="name" label="商品名称" show-overflow-tooltip></el-table-column>
                            <el-table-column prop="addon" label="规格属性" show-overflow-tooltip></el-table-column>
                            <el-table-column prop="productId" label="商品编号" width="100"></el-table-column>
                            <el-table-column prop="unit" label="单位" width="60"></el-table-column>
                            <el-table-column prop="craftsNames" label="工艺" width="120"></el-table-column>
                            <el-table-column prop="nums" label="数量" width="100" fixed="right">
                                <template slot-scope="scope">
                                    <el-input type="number" v-model="scope.row.nums" size="small" min="0"
                                              :max="scope.row.nums" :value="scope.row.nums"></el-input>
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                </div>
            </div>
            <!-- 发货明细 end -->
            <div class="grid-btn text-center">
                <a class="btn btn-primary btn-sm" @click="saveLogistics">确认保存</a>
                <a class="btn btn-warning btn-sm" @click="reload">返回</a>
            </div>
        </form>
    </div>

    <!-- 大纸订单详细信息 -->
    <div v-show="showOrder" id="orderDetailDiv">

        <!-- 操作 start -->
        <div class="panel-default" style="display: block;" align="center">
            <template v-if="status == 1">
                <!-- 详情 -->
                <div style="padding: 5px 0;" class="container">
                    <div class="row">
                        <div class="col-md-8 col-md-offset-2">
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="reload">返回</button>
                            </div>
                            <!--<div class="btn-group btn-group-sm">
                                <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="orderPrint">订单打印</button>
                            </div>-->
                            <#if shiro.hasPermission("order:orderinfo:orderfinish")>
                                <div class="btn-group btn-group-sm">
                                    <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="orderFinish">完成</button>
                                </div>
                            </#if>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="orderPay">支付</button>
                            </div>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="delPaperOrder">作废</button>
                            </div>
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="applyService">售后</button>
                            </div>
                        </div>
                    </div>
                </div>
            </template>
            <template v-else-if="status == 2">
                <!-- 编辑 -->
                <div style="padding: 5px 0;" class="container">
                    <div class="row">
                        <div class="col-md-6 col-md-offset-3">
                            <div class="btn-group btn-group-sm">
                                <button type="button" class="btn btn-default" style="width: 100px;height: 30px;" @click="reload">返回</button>
                            </div>
                        </div>
                    </div>
                </div>
            </template>
            <template v-else>
                <!-- 审核 -->
                <div style="padding: 5px 0;" class="container">
                    <div class="row">
                        <div class="col-md-4 col-md-offset-4">
                            <input type="button" class="btn btn-default btn-sm pull-left" style="width: 100px;height: 30px;" @click="reload" value="取消"/>
                            <input type="button" class="btn btn-default btn-sm pull-right" style="width: 100px;height: 30px;" @click="paperAudit" value="审核"/>
                        </div>
                    </div>
                </div>
            </template>
        </div>
        <!-- 操作 end -->

        <!-- 订单信息 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>订单信息</strong></span>
            <template v-if="status == 2">
                <span style="margin-right: 10px;" class="pull-right">
                    <a href="javascript:;" @click="openShipForm"><i class="fa fa-edit"></i>&nbsp;修改收货人信息</a>
                </span>
            </template>
        </div>
        <div class="panel panel-default">
            <table class="table">
                <tbody>
                <tr class="active">
                    <td>&nbsp;&nbsp;&nbsp;{{paperOrderInfo.createtime}} &nbsp;&nbsp;&nbsp; 订单编号：{{paperOrderInfo.orderId}}</td>
                </tr>
                </tbody>
            </table>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-3">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 control-label">会员名:</div>
                                <div class="col-md-5"><span>{{paperOrderInfo.memberName}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">收货人:</div>
                                <div class="col-md-5"><span>{{erpOrder == null ? paperOrderInfo.shipName : erpOrder.shipName}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">联系方式:</div>
                                <div class="col-md-5"><span>{{erpOrder == null ? paperOrderInfo.shipMobile : erpOrder.shipMobile}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">交货时间:</div>
                                <div class="col-md-5"><span>{{erpOrder == null ? paperOrderInfo.shipTime : erpOrder.shipTime}}</span></div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-3">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 control-label">配送方式:</div>
                                <div class="col-md-5">
                                    <template v-if="erpOrder != null">
                                        <span>{{erpOrder.sendType == 0 ? '非自提' : '自提'}}</span>
                                    </template>
                                    <template v-else>
                                        <span>{{paperOrderInfo.pickUp == true ? '自提' : '非自提'}}</span>
                                    </template>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">配送地区:</div>
                                <div class="col-md-6"><span>{{erpOrder == null ? paperOrderInfo.shipArea : erpOrder.shipArea}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">地址:</div>
                                <div class="col-md-6"><span>{{erpOrder == null ? paperOrderInfo.shipAddr : erpOrder.shipAddr}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">邮编:</div>
                                <div class="col-md-6"><span>{{erpOrder == null ? paperOrderInfo.shipZip : erpOrder.shipZip}}</span></div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-3">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 control-label">配送报价:</div>
                                <div class="col-md-5"><span>{{erpOrder == null ? paperOrderInfo.costFreight : erpOrder.costFreight}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">商品重量:</div>
                                <div class="col-md-5"><span>{{paperOrderInfo.weight <= 0 ?  '' : paperOrderInfo.weight}}</span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 control-label">获得积分:</div>
                                <div class="col-md-5"><span>{{paperOrderInfo.scoreG}}</span></div>
                            </div>
                        </form>
                    </div>
                    <div class="col-md-3">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 control-label">顾客备注:</div>
                                <div class="col-md-5"><span>{{paperOrderInfo.memo}}</span></div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 订单信息 end-->

        <!-- 商品信息 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>商品信息</strong></span>
        </div>
        <div class="panel panel-default">
            <table class="table table-bordered">
                <tbody>
                <tr class="text-center active">
                    <td width="5%">序号</td>
                    <td width="5%">SPU</td>
                    <td>商品名称</td>
                    <td>是否加急</td>
                    <td>克重(G)</td>
                    <td>类型</td>
                    <td>长</td>
                    <td>宽</td>
                    <td>吨价</td>
                    <td>令价</td>
                    <td>箱价</td>
                    <td>数量</td>
                    <td>金额</td>
                    <template v-if="status == 3">
                        <td style="width: 5%">商品修改</td>
                    </template>
                    <template v-else>
                        <td style="width: 5%">商品审核</td>
                    </template>
                </tr>
                <tr class="text-center" v-for="(orderItem, index) in orderItemList">
                    <td>{{index+1}}</td>
                    <td>{{orderItem.goodsId}}</td>
                    <td>
                        <!-- 紫云网 -->
                        <a v-if="orderItem.stageType != 2" target="_blank" :href="'http://www.11ziyun.com/goods/' + orderItem.goodsId">{{orderItem.name}}</a>
                        <!-- POP平台 -->
                        <a v-else target="_blank" :href="'http://mall.11ziyun.com/mall/skuProductDetails.do?goodsId=' + orderItem.goodsId + '&goodsType=' + orderItem.goodsType">{{orderItem.name}}</a>
                    </td>
                    <td><span style="color: red" v-if="orderItem.urgent">是</span>
                        <span v-else>否</span>
                    </td>
                    <td>{{orderItem.paperWeight}}</td>
                    <!-- 商品类型 -->
                    <template v-for="item in e.goodsTypeEnum">
                        <template v-if="orderItem.goodsType == item.value">
                            <td>
                                <span style="vertical-align:sub;">{{item.describe}}</span>
                            </td>
                        </template>
                    </template>
                    <td>{{orderItem.paperLen}}</td>
                    <td>{{orderItem.paperWidth}}</td>
                    <td>{{orderItem.tonPrice}}</td>
                    <td>{{orderItem.reamPrice}}</td>
                    <td>{{orderItem.boxPrice}}</td>
                    <td>{{orderItem.nums}}</td>
                    <td>{{orderItem.amount}}</td>
                    <template v-if="status == 3">
                        <td>
                            <a href="javascript:;" @click="orderItemUpdate(index)">修改</a>
                        </td>
                    </template>
                    <template v-else>
                        <td>
                            <span style="font-weight: bold;vertical-align:sub" class="text-success"  v-if="erpOrder != null && erpOrder.productionStatus != 1">已审核</span>
                            <span style="vertical-align:sub" class="text-danger" style="font-weight: bold" v-else>未审核</span>
                        </td>
                    </template>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 商品信息 end -->

        <!-- 费用明细 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>费用明细</strong></span>
            <template v-if="status == 2">
                <span style="margin-right: 10px;" class="pull-right">
                <a href="javascript:;" @click="costFormShow"><i class="fa fa-edit"></i>&nbsp;修改信息</a>
            </span>
            </template>
        </div>
        <div class="panel panel-default">
            <table class="table table-bordered">
                <tbody>
                <tr class="text-center active">
                    <td>商品总额</td>
                    <td>配送费用</td>
                    <td>调价</td>
                    <td>商品促销优惠</td>
                    <td>优惠券</td>
                    <td>随机立减</td>
                    <td>运费保险</td>
                    <td>应支付额</td>
                    <td>已支付额</td>
                </tr>
                <tr class="text-center">
                    <td>{{paperOrderInfo.totalAmount}}</td>
                    <td>{{paperOrderInfo.costFreight}}</td>
                    <td>{{paperOrderInfo.discount}}</td>
                    <td>{{paperOrderInfo.pmtGoods}}</td>
                    <td>{{paperOrderInfo.pmtOrder}}</td>
                    <td>{{paperOrderInfo.pmtRandom}}</td>
                    <td></td>
                    <td>{{paperOrderInfo.payableAmount}}</td>
                    <td>{{paperOrderInfo.payed}}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 费用明细 end-->

        <!-- 支付信息 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>支付信息</strong></span>
        </div>
        <div class="panel panel-default">
            <table class="table table-bordered">
                <tbody>
                <tr class="text-center active">
                    <td>支付单号</td>
                    <td>支付类型</td>
                    <td>支付金额</td>
                    <td>支付时间</td>
                </tr>
                <tr class="text-center" v-for="(userPayment, index) in userPaymentList">
                    <td>{{userPayment.paymentId}}</td>
                    <td>{{userPayment.payName}}</td>
                    <td>{{userPayment.money}}</td>
                    <td>{{userPayment.tpayed}}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 支付信息 end -->

        <!-- 发票明细 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>发票信息</strong></span>
            <template v-if="status == 2">
                <span style="margin-right: 10px;" class="pull-right">
                    <a href="javascript:;" @click="openInvoiceFrom"><i class="fa fa-edit"></i>&nbsp;修改信息</a>
                </span>
            </template>
        </div>
        <div class="panel panel-default">
            <table class="table table-bordered">
                <tbody>
                <tr class="text-center active">
                    <td>发票类型</td>
                    <td>纳税人识别号</td>
                    <td>发票内容</td>
                    <td>注册地址</td>
                    <td>发票抬头</td>
                    <td>注册电话</td>
                    <td>发票种类</td>
                    <td>开户银行</td>
                    <td>银行账户</td>
                    <td>税金</td>
                </tr>
                <tr class="text-center">
                    <td>
                        <template v-for="item in e.taxTypeEnum">
                            <template v-if="item.value == paperOrderInfo.taxType">
                                {{item.describe}}
                            </template>
                        </template>
                    </td>
                    <td>{{paperOrderInfo.taxIdentification}}</td>
                    <td>{{paperOrderInfo.taxContent}}</td>
                    <td>{{paperOrderInfo.taxAddr}}</td>
                    <td>{{paperOrderInfo.taxCompany}}</td>
                    <td>{{paperOrderInfo.taxTel}}</td>
                    <td></td>
                    <td>{{paperOrderInfo.taxAccountName}}</td>
                    <td>{{paperOrderInfo.taxNumber}}</td>
                    <td></td>
                </tr>
                </tbody>
            </table>
        </div>
        <!-- 发票明细 end-->

        <!-- 订单备注 订单日志 start -->
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-4">
                        <!-- 订单备注 start -->
                        <div style="margin-bottom: 5px;">
                            <span style="margin-left: 10px;"><strong>订单备注</strong></span>
                        </div>
                        <div class="panel panel-default">
                            <table class="table table-bordered">
                                <tbody>
                                <tr class="text-center active">
                                    <td>时间</td>
                                    <td>操作人</td>
                                    <td>操作内容</td>
                                </tr>
                                <tr class="text-center" v-for="(remark, index) in orderRemarks">
                                    <td>{{remark.orCreateTime}}</td>
                                    <td>{{remark.orCreateNameVal}}</td>
                                    <td>{{remark.orRemarks}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <!-- 订单备注 end -->
                    </div>
                    <div class="col-md-4">
                        <!-- 订单日志 start -->
                        <div style="margin-bottom: 5px;">
                            <span style="margin-left: 10px;"><strong>商城日志</strong></span>
                        </div>
                        <table class="table table-bordered">
                            <tbody>
                            <tr class="text-center active">
                                <td>时间</td>
                                <td>操作人</td>
                                <td>操作内容</td>
                            </tr>
                            <tr class="text-center" v-for="(log, index) in orderLogs">
                                <td>{{log.alttime}}</td>
                                <td>{{log.name}}</td>
                                <td>{{log.logText}}</td>
                            </tr>
                            </tbody>
                        </table>
                        <!-- 订单日志 end -->
                    </div>
                    <div class="col-md-4">
                        <!-- 订单日志 start -->
                        <div style="margin-bottom: 5px;">
                            <span style="margin-left: 10px;"><strong>订单日志</strong></span>
                        </div>
                        <table class="table table-bordered">
                            <tbody>
                            <tr class="text-center active">
                                <td>时间</td>
                                <td>操作人</td>
                                <td>操作内容</td>
                            </tr>
                            <tr class="text-center" v-for="(log, index) in erpOrderLogs">
                                <td>{{log.createTime}}</td>
                                <td>{{log.createName}}</td>
                                <td>{{log.logText}}</td>
                            </tr>
                            </tbody>
                        </table>
                        <!-- 订单日志 end -->
                    </div>
                </div>
            </div>
        </div>
        <!-- 订单备注 订单日志 end -->

        <!-- 处理人员 start -->
        <div style="margin-bottom: 5px;">
            <span style="margin-left: 10px;"><strong>处理人员</strong></span>
        </div>
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="col-md-2">
                    <strong>审批人：</strong><span style="color: grey;">{{erpOrder == null ? '' : erpOrder.auditNameVal}}</span>
                </div>
                <div class="col-md-2">
                    <strong>客服：</strong><span style="color: grey;">{{erpOrder == null ? '' : erpOrder.csNameVal}}</span>
                </div>
                <div class="col-md-2">
                    <strong>跟单员：</strong><span style="color: grey;">{{erpOrder == null ? '' : erpOrder.pmcNameVal}}</span>
                </div>
            </div>
        </div>
        <!-- 处理人员 end -->

    </div>

    <!-- 修改收货人信息 -->
    <el-dialog title="修改收货人信息" :visible.sync="shipFormVisible" width= "40%">
        <el-form :model="shipForm" size="medium">

            <el-form-item label="收货人：" :label-width="formLabelWidth">
                <el-input v-model="shipForm.shipName" auto-complete="off"></el-input>
            </el-form-item>

            <el-form-item label="联系方式：" :label-width="formLabelWidth">
                <el-input v-model="shipForm.shipMobile" auto-complete="off"></el-input>
            </el-form-item>

            <el-form-item label="配送地区：" :label-width="formLabelWidth">
                <el-cascader v-model="shipForm.areaCascader" placeholder="试试搜索：武汉市" :options="options" filterable @change="handleItemChange"></el-cascader>
            </el-form-item>

            <el-form-item label="地址：" :label-width="formLabelWidth">
                <el-input v-model="shipForm.shipAddr" auto-complete="off"></el-input>
            </el-form-item>

            <el-form-item label="邮编：" :label-width="formLabelWidth">
                <el-input v-model="shipForm.shipZip" auto-complete="off"></el-input>
            </el-form-item>

            <el-form-item label="配送方式：" :label-width="formLabelWidth">
                <el-radio v-model="shipForm.sendType" label="0">非自提</el-radio>
                <el-radio v-model="shipForm.sendType" label="1">自提</el-radio>
            </el-form-item>

            <el-form-item label="配送报价：" :label-width="formLabelWidth">
                <el-input v-model="shipForm.costFreight" auto-complete="off"></el-input>
            </el-form-item>

        </el-form>

        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="shipFormVisible = false">取 消</el-button>
            <el-button size="small" type="primary" @click="changeShipInfo">确 定</el-button>
        </div>
    </el-dialog>

    <!--  修改费用明细 -->
    <el-dialog title="订单调价" :visible.sync="costFormVisible" width= "30%">
        <el-form :model="costForm" size="medium">
            <el-form-item label="调价：" :label-width="formLabelWidth">
                <el-input type="number" v-model="costForm.discount" auto-complete="off"></el-input>
                <div style="color: #909399">提示：要给顾客便宜100元，则输入"-100"；要提高订单价格100元，则输入"100"。</div>
            </el-form-item>
            <el-form-item label="备注：" :label-width="formLabelWidth">
                <el-input type="textarea" maxLength="200" v-model="costForm.remark" placeholder="请填写备注内容，200字以内" ></el-input>
                <div style="color: #F56C6C">注：请填写改价原因。</div>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="costFormVisible = false">取 消</el-button>
            <el-button size="small" type="primary" @click="changeCost">确 定</el-button>
        </div>
    </el-dialog>

    <!--修改发票信息 -->
    <el-dialog title="修改发票信息" :visible.sync="invoiceFormVisible"  width="35%" center>
        <el-form ref="invoiceFrom" :model="invoiceFrom" size="medium">
            <el-form-item label="发票类型" :label-width="formLabelWidth" prop="taxType"
                          :rules ="[{ required: true, message: '发票类型 最少选着一条', trigger: 'change'}]" >
                <el-select v-model="invoiceFrom.taxType" placeholder="请选择发票类别" style="width:100%" clearable>
                    <el-option label="个人发票" value="personal"></el-option>
                    <el-option label="公司普通发票" value="companyOrdinary"></el-option>
                    <el-option label="专票" value="companySpecial"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="纳税人识别号" :label-width="formLabelWidth" prop="taxIdentification"
                          :rules ="[{ required: true, message: '请填写纳税人识别号'}]">
                <el-input  v-model="invoiceFrom.taxIdentification" autocomplete="off" clearable></el-input>
            </el-form-item>
            <el-form-item label="发票内容" :label-width="formLabelWidth" prop="taxContent">
                <el-select v-model="invoiceFrom.taxContent" placeholder="请选择内容" style="width:100%" clearable>
                    <el-option  v-for="textV in e.taxContentEnum" :label="textV.text"
                                :selected="textV.text ==invoiceFrom.taxContent" :value="textV.text">{{textV.text}}</el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="注册地址" :label-width="formLabelWidth" prop="taxAddr">
                <el-input v-model="invoiceFrom.taxAddr" autocomplete="off" clearable></el-input>
            </el-form-item>
            <el-form-item label="发票抬头" :label-width="formLabelWidth"  prop="taxCompany"
                          :rules ="[{ required: true, message: '请填写发票抬头'}]">
                <el-input v-model="invoiceFrom.taxCompany" autocomplete="off" clearable></el-input>
            </el-form-item>
            <el-form-item label="注册电话" :label-width="formLabelWidth" prop="taxTel">
                <el-input v-model="invoiceFrom.taxTel" autocomplete="off" clearable></el-input>
            </el-form-item>
            <!--   <el-form-item label="发票种类" :label-width="formLabelWidth">
                  <el-input v-model="form.name" autocomplete="off"></el-input>
              </el-form-item>  -->
            <el-form-item label="开户银行" :label-width="formLabelWidth" prop="taxAccountName">
                <el-input v-model="invoiceFrom.taxAccountName" autocomplete="off" clearable></el-input>
            </el-form-item>
            <el-form-item label="银行账户" :label-width="formLabelWidth" prop="taxNumber">
                <el-input v-model="invoiceFrom.taxNumber" autocomplete="off" clearable></el-input>
            </el-form-item>
            <!--   <el-form-item label="税金" :label-width="formLabelWidth">
                <el-input v-model="form.name" autocomplete="off"></el-input>
             </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="resetForm('invoiceFrom')">重置</el-button>
            <el-button size="small" type="primary" @click="changeTaxInfo('invoiceFrom')">确 定</el-button>
        </div>
    </el-dialog>

    <!-- 修改商品信息 -->
    <div id="orderItemLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">

                <div class="form-group">
                    <div class="col-md-3 control-label">货号：</div>
                    <div class="col-md-9">
                        <span style="vertical-align: sub;">{{update.orderItem.productId}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">商品名称：</div>
                    <div class="col-md-9">
                        <span style="vertical-align: sub;">{{update.orderItem.name}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">规格属性：</div>
                    <div class="col-md-9">
                        <span style="vertical-align: sub;">{{update.orderItem.addon}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">吨价：</div>
                    <div class="col-md-9">
                        <input type="text" class="form-control" v-model="update.orderItem.tonPrice" @change="tonPriceChange" placeholder="吨价"/>
                    </div>
                </div>

                <div class="form-group" v-if="update.orderItem.paperUnit == 'ream'">
                    <div class="col-md-3 control-label">令价：</div>
                    <div class="col-md-9">
                        <input type="text" class="form-control" v-model="update.orderItem.reamPrice" @change="reamPriceChange" placeholder="令价"/>
                    </div>
                </div>

                <div class="form-group" v-if="update.orderItem.paperUnit == 'none' && update.orderItem.goodsType == 'copy'">
                    <div class="col-md-3 control-label">箱价：</div>
                    <div class="col-md-9">
                        <input type="text" class="form-control" v-model="update.orderItem.boxPrice" @change="boxPriceChange" placeholder="箱价"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">购买数量：</div>
                    <div class="col-md-9">
                        <input type="text" class="form-control" v-model="update.orderItem.nums" @change="itemNumsChange" placeholder="购买数量"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">小计：</div>
                    <div class="col-md-9">
                        <span style="vertical-align: sub;">{{update.orderItem.amount}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label" style="color: red"></div>
                    <div class="col-md-9">
                        <p class="text-danger" style="vertical-align: sub;">提示：订单审核后商品的修改生效</p>
                    </div>
                </div>

            </div>
        </form>
    </div>

    <!-- 审核 -->
    <div id="auditLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">

                <div class="form-group">
                    <div class="col-md-3 control-label">运费金额：</div>
                    <div class="col-md-9">
                        <input type="text" class="form-control" v-model="audit.costFreight" @change="orderPriceChange" placeholder="运费金额"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">优惠金额：</div>
                    <div class="col-md-9">
                        <input type="text" class="form-control" v-model="audit.discount" @change="orderPriceChange" placeholder="优惠金额"/>
                        <p class="text-danger">提示：要给顾客便宜 100 元，则输入 "-100" ；要提高订单价格 100 元，则输入 "100" </p>
                    </div>
                </div>

                <div class="form-group" v-if="update.orderItem.tonPrice != ''">
                    <div class="col-md-3 control-label">订单总金额：</div>
                    <div class="col-md-9">
                        <span style="vertical-align: sub;">{{audit.payableAmount}}</span>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3 control-label">审核备注：</div>
                    <div class="col-md-9">
                        <textarea class="form-control" rows="3" maxlength="200" v-model.trim="pub.remark" placeholder="请填写备注内容，200字以内"></textarea>
                    </div>
                </div>

            </div>
        </form>
    </div>

    <!-- 订单支付 -->
    <div id="orderPayLayer" style="display: none;">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span6">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <div class="col-md-3 control-label">订单号：</div>
                            <div class="col-md-9">
                                <span style="vertical-align: sub;color: grey">{{paperOrderInfo.orderId}}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">银行账户选择：</div>
                            <div class="col-md-9">
                                <select class="form-control" @change="receiptsAccountsChange($event)">
                                    <option value="">---请选择---</option>
                                    <option v-for="(item, index) in receiptsAccounts"  :value="index">{{ item.fraBank + '--' + item.fraAccount }}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">收款银行：</div>
                            <div class="col-md-9">
                                <input type="text" v-model="pay.bank" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">客户应付金额：</div>
                            <div class="col-md-9">
                                <span style="vertical-align: sub;color: grey">{{paperOrderInfo.payableAmount}}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">付款人：</div>
                            <div class="col-md-9">
                                <span style="vertical-align: sub;color: grey">{{username}}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">支付方式：</div>
                            <div class="col-md-9">
                                <select class="form-control" v-model="pay.payAppId" @change="payTypeChange">
                                    <option value="">---请选择---</option>
                                    <option v-for="(item, index) in e.payTypeEnum" :value="item.value">{{ item.describe }}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">下单时间：</div>
                            <div class="col-md-9">
                                <span style="vertical-align: sub;color: grey">{{paperOrderInfo.createtime}}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">收款账户：</div>
                            <div class="col-md-9">
                                <input type="text" v-model="pay.account" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">客户支付时间：</div>
                            <div class="col-md-9">
                                <input class="form-control" v-model="pay.tPayed" readonly="readonly" @click = "checkPayDate"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">支付金额：</div>
                            <div class="col-md-9">
                                <input type="text" v-model="pay.money" :value="paperOrderInfo.payableAmount" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3 control-label">备注：</div>
                            <div class="col-md-9">
                                <textarea class="form-control" maxlength="200" rows="3" v-model="pay.memo" placeholder="请填写备注内容，200字以内"></textarea>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <!-- 备注 -->
    <div id="remarksLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-md-3 control-label">订单号：</div>
                    <span style="vertical-align: sub;color: grey">{{pub.orderId}}</span>
                </div>
                <div class="form-group">
                    <div class="col-md-10 col-md-offset-1">
                        <textarea class="form-control" rows="3" maxlength="200" v-model.trim="pub.remark" placeholder="请填写备注内容，200字以内"></textarea>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <!-- 是否开发票 -->
    <div id="taxLayer" style="display: none;">
        <form class="form-horizontal">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-md-3 control-label">订单号：</div>
                    <span style="vertical-align: sub;color: grey">{{taxForm.orderId}}</span>
                </div>
                <div class="form-group">
                    <div class="col-md-3 control-label">是否开发票：</div>
                    <el-radio v-model="taxForm.sendTax" label="0">不开</el-radio>
                    <el-radio v-model="taxForm.sendTax" label="1">开</el-radio>
                </div>
            </div>
        </form>
    </div>

</div>
<#include "/modules/service/serviceRegisterPage.html">
<script src="${request.contextPath}/statics/js/modules/order/paperOrderInfo.js?_${.now?long}"></script>
</body>
</html>